<!DOCTYPE html>
<!--把html 的名称空间，改成：xmlns:th="http://www.thymeleaf.org" 会有语法提示-->
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:easyui="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
        <title>人员编辑</title>
        <script type="text/javascript" src="../../static/easyui/boot.js" th:src="@{/static/easyui/boot.js}"></script>
    </head>
    <body>
        <div class="pt-info container">
            <form id="frmMain" class="form-horizontal" method="post" style="margin: 50px 0;">
                <div class="pt-content row">
<!--                    <select id="cc" class="easyui-combotree" style="width:200px;"-->
<!--                            data-options="url:'/api/sysMenu/getMenuTreeList.do',required:true,valueField:'id',textField:'name'"></select>-->
                    <easyui:hidden name="id" vtype="text" th:value="${entity?.id}"/>
                    <easyui:select label="上级菜单" vtype="comtree" name="sex6" required="true" url="/api/sysMenu/getMenuTreeList.do?state=closed" readonly="false" value="" valueField="id" textField="text" width="col-md-10"/>
                </div>

                <div class="pt-tool row">
                    <easyui:button label="保存" vtype="save" name="butSave" plain="fasle" onclick="save()"/>
                    <easyui:button label="关闭" vtype="close" name="butClose"  plain="fasle" onclick="windowsClose()"/>
                </div>
            </form>
        </div>
    </body>
</html>
<script type="text/javascript">
    $(document).ready(function () {

    });

    //保存
    function save() {
        if($("#password").val()!=$("#passwordOk").val()){
            showAlert('警告','2次输入的密码不一致!',"warning");
        }else{
            formSubmit("frmMain","/sysAccount/save.do",function(e){
                if(e.code==0){
                    showAlert('信息',e.result,"info",function () {
                        windowsClose();
                    });
                }else{
                    showAlert('信息',e.result,"error");
                }
            });
        }
    }
</script>